package cn.orange.feign;
import cn.orange.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
//openfign熔断策略针对被调方生效
@FeignClient(name = "user-server",fallbackFactory = getByIdfallbackFactory.class)
public interface UserService {
    @GetMapping("/user/{id}")
    User getById(@PathVariable("id") Long id);

}